"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
var vue_1 = require("vue");
var element_plus_1 = require("element-plus");
// 筛选表单数据
var filterForm = (0, vue_1.reactive)({
    operator: '',
    dateRange: []
});
// 分页数据
var pagination = (0, vue_1.reactive)({
    currentPage: 1,
    pageSize: 5,
    total: 0
});
// 表格数据 & 加载状态
var recordList = (0, vue_1.ref)([]);
var isLoading = (0, vue_1.ref)(false);
// 模拟操作记录数据
var mockRecords = [
    {
        id: 1900,
        operator: '陈燕',
        module: '收银操作',
        type: '收款单查询',
        ip: '192.168.1.1',
        recordTime: '2020-06-20 15:30:20'
    },
    {
        id: 1900,
        operator: '陈燕',
        module: '收银操作',
        type: '新增产品',
        ip: '192.168.1.1',
        recordTime: '2020-06-20 15:30:20'
    },
    {
        id: 1900,
        operator: '陈燕',
        module: '收银操作',
        type: '门店期初',
        ip: '192.168.1.1',
        recordTime: '2020-06-20 15:30:20'
    },
    {
        id: 1900,
        operator: '张三',
        module: '收银操作',
        type: '收款单查询',
        ip: '192.168.1.1',
        recordTime: '2020-06-20 15:30:20'
    },
    {
        id: 1900,
        operator: '李四',
        module: '收银操作',
        type: '门店期初',
        ip: '192.168.1.1',
        recordTime: '2020-06-20 15:30:20'
    },
    {
        id: 1901,
        operator: '王五',
        module: '库存管理',
        type: '出库查询',
        ip: '192.168.1.2',
        recordTime: '2020-06-20 16:10:05'
    },
    {
        id: 1902,
        operator: '赵六',
        module: '会员管理',
        type: '新增会员',
        ip: '192.168.1.3',
        recordTime: '2020-06-20 17:20:30'
    }
];
// 页面加载时初始化数据
(0, vue_1.onMounted)(function () {
    fetchRecords();
});
// 获取操作记录（模拟接口请求）
var fetchRecords = function () {
    isLoading.value = true;
    // 模拟接口延迟
    setTimeout(function () {
        // 实际项目中：根据筛选条件+分页参数请求接口
        var filtered = mockRecords.filter(function (item) {
            // 操作人筛选
            if (filterForm.operator && !item.operator.includes(filterForm.operator)) {
                return false;
            }
            // 日期范围筛选
            if (filterForm.dateRange.length) {
                var _a = filterForm.dateRange, start = _a[0], end = _a[1];
                var recordDate = item.recordTime.split(' ')[0];
                if (recordDate < start || recordDate > end) {
                    return false;
                }
            }
            return true;
        });
        // 分页处理
        var startIndex = (pagination.currentPage - 1) * pagination.pageSize;
        var endIndex = startIndex + pagination.pageSize;
        recordList.value = filtered.slice(startIndex, endIndex);
        pagination.total = filtered.length;
        isLoading.value = false;
    }, 300);
};
// 查询操作
var handleQuery = function () {
    pagination.currentPage = 1;
    fetchRecords();
    element_plus_1.ElMessage.success('查询成功');
};
// 删除操作
var handleDelete = function (row) {
    element_plus_1.ElMessageBox.confirm('此操作将永久删除该记录，是否继续？', '提示', {
        type: 'warning'
    }).then(function () {
        // 模拟接口删除
        recordList.value = recordList.value.filter(function (item) { return item !== row; });
        pagination.total--;
        element_plus_1.ElMessage.success('删除成功！');
    }).catch(function () {
        element_plus_1.ElMessage.info('已取消删除');
    });
};
// 分页：每页条数改变
var handleSizeChange = function (val) {
    pagination.pageSize = val;
    fetchRecords();
};
// 分页：当前页改变
var handleCurrentChange = function (val) {
    pagination.currentPage = val;
    fetchRecords();
};
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
var __VLS_ctx = __assign(__assign({}, {}), {});
var __VLS_elements;
var __VLS_components;
var __VLS_directives;
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "operation-record-page" }));
__VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)(__assign({ class: "page-title" }));
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "filter-bar" }));
var __VLS_0 = {}.ElForm;
/** @type {[typeof __VLS_components.ElForm, typeof __VLS_components.elForm, typeof __VLS_components.ElForm, typeof __VLS_components.elForm, ]} */ ;
// @ts-ignore
ElForm;
// @ts-ignore
var __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0(__assign({ 'onSubmit': {} }, { inline: true, model: (__VLS_ctx.filterForm) })));
var __VLS_2 = __VLS_1.apply(void 0, __spreadArray([__assign({ 'onSubmit': {} }, { inline: true, model: (__VLS_ctx.filterForm) })], __VLS_functionalComponentArgsRest(__VLS_1), false));
var __VLS_4;
var __VLS_5;
var __VLS_6 = ({ submit: {} },
    { onSubmit: function () { } });
var __VLS_7 = __VLS_3.slots.default;
// @ts-ignore
[filterForm,];
var __VLS_8 = {}.ElFormItem;
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
// @ts-ignore
ElFormItem;
// @ts-ignore
var __VLS_9 = __VLS_asFunctionalComponent(__VLS_8, new __VLS_8({
    label: "操作人：",
}));
var __VLS_10 = __VLS_9.apply(void 0, __spreadArray([{
        label: "操作人：",
    }], __VLS_functionalComponentArgsRest(__VLS_9), false));
var __VLS_12 = __VLS_11.slots.default;
var __VLS_13 = {}.ElInput;
/** @type {[typeof __VLS_components.ElInput, typeof __VLS_components.elInput, ]} */ ;
// @ts-ignore
ElInput;
// @ts-ignore
var __VLS_14 = __VLS_asFunctionalComponent(__VLS_13, new __VLS_13(__assign({ modelValue: (__VLS_ctx.filterForm.operator), placeholder: "请输入操作人", clearable: true }, { style: {} })));
var __VLS_15 = __VLS_14.apply(void 0, __spreadArray([__assign({ modelValue: (__VLS_ctx.filterForm.operator), placeholder: "请输入操作人", clearable: true }, { style: {} })], __VLS_functionalComponentArgsRest(__VLS_14), false));
// @ts-ignore
[filterForm,];
var __VLS_11;
var __VLS_18 = {}.ElFormItem;
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
// @ts-ignore
ElFormItem;
// @ts-ignore
var __VLS_19 = __VLS_asFunctionalComponent(__VLS_18, new __VLS_18({
    label: "日期：",
}));
var __VLS_20 = __VLS_19.apply(void 0, __spreadArray([{
        label: "日期：",
    }], __VLS_functionalComponentArgsRest(__VLS_19), false));
var __VLS_22 = __VLS_21.slots.default;
var __VLS_23 = {}.ElDatePicker;
/** @type {[typeof __VLS_components.ElDatePicker, typeof __VLS_components.elDatePicker, ]} */ ;
// @ts-ignore
ElDatePicker;
// @ts-ignore
var __VLS_24 = __VLS_asFunctionalComponent(__VLS_23, new __VLS_23({
    modelValue: (__VLS_ctx.filterForm.dateRange),
    type: "daterange",
    rangeSeparator: "至",
    startPlaceholder: "年/月/日",
    endPlaceholder: "年/月/日",
    format: "YYYY/MM/DD",
    valueFormat: "YYYY/MM/DD",
}));
var __VLS_25 = __VLS_24.apply(void 0, __spreadArray([{
        modelValue: (__VLS_ctx.filterForm.dateRange),
        type: "daterange",
        rangeSeparator: "至",
        startPlaceholder: "年/月/日",
        endPlaceholder: "年/月/日",
        format: "YYYY/MM/DD",
        valueFormat: "YYYY/MM/DD",
    }], __VLS_functionalComponentArgsRest(__VLS_24), false));
// @ts-ignore
[filterForm,];
var __VLS_21;
var __VLS_28 = {}.ElFormItem;
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
// @ts-ignore
ElFormItem;
// @ts-ignore
var __VLS_29 = __VLS_asFunctionalComponent(__VLS_28, new __VLS_28({}));
var __VLS_30 = __VLS_29.apply(void 0, __spreadArray([{}], __VLS_functionalComponentArgsRest(__VLS_29), false));
var __VLS_32 = __VLS_31.slots.default;
var __VLS_33 = {}.ElButton;
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
// @ts-ignore
ElButton;
// @ts-ignore
var __VLS_34 = __VLS_asFunctionalComponent(__VLS_33, new __VLS_33(__assign({ 'onClick': {} }, { type: "primary" })));
var __VLS_35 = __VLS_34.apply(void 0, __spreadArray([__assign({ 'onClick': {} }, { type: "primary" })], __VLS_functionalComponentArgsRest(__VLS_34), false));
var __VLS_37;
var __VLS_38;
var __VLS_39 = ({ click: {} },
    { onClick: (__VLS_ctx.handleQuery) });
var __VLS_40 = __VLS_36.slots.default;
// @ts-ignore
[handleQuery,];
var __VLS_36;
var __VLS_31;
var __VLS_3;
var __VLS_41 = {}.ElTable;
/** @type {[typeof __VLS_components.ElTable, typeof __VLS_components.elTable, typeof __VLS_components.ElTable, typeof __VLS_components.elTable, ]} */ ;
// @ts-ignore
ElTable;
// @ts-ignore
var __VLS_42 = __VLS_asFunctionalComponent(__VLS_41, new __VLS_41(__assign(__assign({ data: (__VLS_ctx.recordList), border: true, stripe: true }, { style: {} }), { loading: (__VLS_ctx.isLoading) })));
var __VLS_43 = __VLS_42.apply(void 0, __spreadArray([__assign(__assign({ data: (__VLS_ctx.recordList), border: true, stripe: true }, { style: {} }), { loading: (__VLS_ctx.isLoading) })], __VLS_functionalComponentArgsRest(__VLS_42), false));
var __VLS_45 = __VLS_44.slots.default;
// @ts-ignore
[recordList, isLoading,];
var __VLS_46 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_47 = __VLS_asFunctionalComponent(__VLS_46, new __VLS_46({
    prop: "id",
    label: "ID",
}));
var __VLS_48 = __VLS_47.apply(void 0, __spreadArray([{
        prop: "id",
        label: "ID",
    }], __VLS_functionalComponentArgsRest(__VLS_47), false));
var __VLS_51 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_52 = __VLS_asFunctionalComponent(__VLS_51, new __VLS_51({
    prop: "operator",
    label: "操作人",
}));
var __VLS_53 = __VLS_52.apply(void 0, __spreadArray([{
        prop: "operator",
        label: "操作人",
    }], __VLS_functionalComponentArgsRest(__VLS_52), false));
var __VLS_56 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_57 = __VLS_asFunctionalComponent(__VLS_56, new __VLS_56({
    prop: "module",
    label: "操作模块",
}));
var __VLS_58 = __VLS_57.apply(void 0, __spreadArray([{
        prop: "module",
        label: "操作模块",
    }], __VLS_functionalComponentArgsRest(__VLS_57), false));
var __VLS_61 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_62 = __VLS_asFunctionalComponent(__VLS_61, new __VLS_61({
    prop: "type",
    label: "操作类型",
}));
var __VLS_63 = __VLS_62.apply(void 0, __spreadArray([{
        prop: "type",
        label: "操作类型",
    }], __VLS_functionalComponentArgsRest(__VLS_62), false));
var __VLS_66 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_67 = __VLS_asFunctionalComponent(__VLS_66, new __VLS_66({
    prop: "ip",
    label: "IP地址",
}));
var __VLS_68 = __VLS_67.apply(void 0, __spreadArray([{
        prop: "ip",
        label: "IP地址",
    }], __VLS_functionalComponentArgsRest(__VLS_67), false));
var __VLS_71 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_72 = __VLS_asFunctionalComponent(__VLS_71, new __VLS_71({
    prop: "recordTime",
    label: "记录时间",
}));
var __VLS_73 = __VLS_72.apply(void 0, __spreadArray([{
        prop: "recordTime",
        label: "记录时间",
    }], __VLS_functionalComponentArgsRest(__VLS_72), false));
var __VLS_76 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_77 = __VLS_asFunctionalComponent(__VLS_76, new __VLS_76({
    label: "操作",
}));
var __VLS_78 = __VLS_77.apply(void 0, __spreadArray([{
        label: "操作",
    }], __VLS_functionalComponentArgsRest(__VLS_77), false));
var __VLS_80 = __VLS_79.slots.default;
{
    var __VLS_81 = __VLS_79.slots.default;
    var scope_1 = __VLS_getSlotParameters(__VLS_81)[0];
    var __VLS_82 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    ElButton;
    // @ts-ignore
    var __VLS_83 = __VLS_asFunctionalComponent(__VLS_82, new __VLS_82(__assign({ 'onClick': {} }, { type: "text", textColor: "#409EFF" })));
    var __VLS_84 = __VLS_83.apply(void 0, __spreadArray([__assign({ 'onClick': {} }, { type: "text", textColor: "#409EFF" })], __VLS_functionalComponentArgsRest(__VLS_83), false));
    var __VLS_86 = void 0;
    var __VLS_87 = void 0;
    var __VLS_88 = ({ click: {} },
        { onClick: function () {
                var _a = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    _a[_i] = arguments[_i];
                }
                var $event = _a[0];
                __VLS_ctx.handleDelete(scope_1.row);
                // @ts-ignore
                [handleDelete,];
            } });
    var __VLS_89 = __VLS_85.slots.default;
    var __VLS_85;
}
var __VLS_79;
var __VLS_44;
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "pagination-container" }));
var __VLS_90 = {}.ElPagination;
/** @type {[typeof __VLS_components.ElPagination, typeof __VLS_components.elPagination, ]} */ ;
// @ts-ignore
ElPagination;
// @ts-ignore
var __VLS_91 = __VLS_asFunctionalComponent(__VLS_90, new __VLS_90(__assign(__assign({ 'onSizeChange': {} }, { 'onCurrentChange': {} }), { currentPage: (__VLS_ctx.pagination.currentPage), pageSizes: ([5, 10, 20]), pageSize: (__VLS_ctx.pagination.pageSize), layout: "prev, pager, next, jumper, ->, total", total: (__VLS_ctx.pagination.total) })));
var __VLS_92 = __VLS_91.apply(void 0, __spreadArray([__assign(__assign({ 'onSizeChange': {} }, { 'onCurrentChange': {} }), { currentPage: (__VLS_ctx.pagination.currentPage), pageSizes: ([5, 10, 20]), pageSize: (__VLS_ctx.pagination.pageSize), layout: "prev, pager, next, jumper, ->, total", total: (__VLS_ctx.pagination.total) })], __VLS_functionalComponentArgsRest(__VLS_91), false));
var __VLS_94;
var __VLS_95;
var __VLS_96 = ({ sizeChange: {} },
    { onSizeChange: (__VLS_ctx.handleSizeChange) });
var __VLS_97 = ({ currentChange: {} },
    { onCurrentChange: (__VLS_ctx.handleCurrentChange) });
// @ts-ignore
[pagination, pagination, pagination, handleSizeChange, handleCurrentChange,];
var __VLS_93;
/** @type {__VLS_StyleScopedClasses['operation-record-page']} */ ;
/** @type {__VLS_StyleScopedClasses['page-title']} */ ;
/** @type {__VLS_StyleScopedClasses['filter-bar']} */ ;
/** @type {__VLS_StyleScopedClasses['pagination-container']} */ ;
var __VLS_export = (await Promise.resolve().then(function () { return require('vue'); })).defineComponent({});
exports.default = {};
